/**
 * 
 */
package qct;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author chentao.qu
 * @since 2012-8-8
 * 
 */
@Controller
public class MainController {
	
	private MainDAO mainDAO;
	
	@Resource(name="mainDAO")
	public void setMainDAO(MainDAO mainDAO) {
		this.mainDAO = mainDAO;
	}

	@RequestMapping("query")
	public String query(@RequestParam("startdate") String startdate, Model model) {
//		String customName = mainDAO.queryCustomName("009145");
//		model.addAttribute("customName", customName);
		model.addAttribute("startdate", startdate);
		
		model.addAttribute("conferenceList", mainDAO.queryAllConference(startdate));
		mainDAO.clearData();
		return "index";
	}
}
